package com.lwq.dubbo.springbootdubboconsumer;

import com.lwq.dubbo.HelloService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class SpringBootDubboConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootDubboConsumerApplication.class, args);
    }

    @DubboReference
    HelloService helloService;

    @GetMapping("/say")
    public String say() {
        return helloService.sayHello("Vincent");
    }
}
